/*
 * SQLException.java
 *
 * Created on September 24, 2004, 10:58 AM
 */

package com.absisgroup.nsc.utilities;

/**
 *
 * @author  hue
 */
public class DBSQLException extends java.sql.SQLException {
    private java.sql.SQLException ex;
    private String request;
    
    public DBSQLException(final java.sql.SQLException _ex, final String _request) {
        ex = _ex;
        request = _request;
    }

    public String getRequest() {
        return request;
    }

    @Override
    public String getLocalizedMessage() {
        return ex.getLocalizedMessage();
    }
    
    @Override
    public String getMessage() {
        return ex.getMessage();
    }

    @Override
    public void printStackTrace() {
        ex.printStackTrace();
    }
    
    @Override
    public int getErrorCode() {
	return ex.getErrorCode();
    }

    @Override
    public void printStackTrace(final java.io.PrintStream s) {
        ex.printStackTrace(s);
    }

    @Override
    public void printStackTrace(final java.io.PrintWriter s) {
        ex.printStackTrace(s);
    }

    @Override
    public String toString() {
        return ex.toString();
    }
    
    @Override
    public String getSQLState() {
        return ex.getSQLState();
    }
}
